#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 2e5 + 10;

int n;
vector<int> a[N];
int b[N];
bool f[N];

void solve(){
    cin >> n;
    for(int i = 1; i <= n; i ++) cin >> b[i];

    for(int i = 0; i <= n; i ++) f[i] = false, a[i].clear();

    f[0] = true;

    for(int i = 1; i <= n; i ++){
        if(i - b[i] - 1 >= 0) f[i] |= f[i - b[i] - 1];
        if(i + b[i] <= n) a[i + b[i]].push_back(i);
        for(int j = 0; j < a[i].size(); j ++){
            int k = a[i][j];
            if(k - 1 >= 0) f[i] |= f[k - 1];
        }
    }



    if(f[n]) cout << "YES" << '\n';
    else cout << "NO" << '\n';
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int T;
    cin >> T;
    while(T--){
        solve();
    }

    return 0;
}